//
//  ServiceRecordViewController.m
//  Utils
//
//  Created by enghou on 2018/6/7.
//  Copyright © 2018年 xyxorigation. All rights reserved.
//

#import "ServiceRecordViewController.h"
#import "ServiceSearchViewController.h"
@interface ServiceRecordViewController ()

@end

@implementation ServiceRecordViewController

-(instancetype)init{
    self = [super init];
    if (self) {
        self.path = @"/mobile/comprehensiveGovernance/serviceRecord/findAppServiceRecords.action";
        self.cellClass = @"WorkReportCell";
        self.modelClsName = @"ServiceItemModel";
    }
    return self;
}

-(NSDictionary *)param{
    NSMutableDictionary *param = [NSMutableDictionary dictionary];
    [param setObject:@"10" forKey:@"rows"];
    [param setObject:[NSString stringWithFormat:@"%li",self.page] forKey:@"page"];
    if (self.orgId) {
        [param setObject:self.orgId forKey:@"serviceRecordVo.organization.id"];
    }
    if ([self.choosenParam isKindOfClass:[NSDictionary class]]) {
        [param addEntriesFromDictionary:self.choosenParam];
    }
    return param;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    // Uncomment the following line to preserve selection between presentations.
    // self.clearsSelectionOnViewWillAppear = NO;
    
    // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
    // self.navigationItem.rightBarButtonItem = self.editButtonItem;
}

-(void)searchAction{
    ServiceSearchViewController *serviceSearch = [[ServiceSearchViewController alloc]init];
    serviceSearch.theDelegate = self;
    serviceSearch.title = @"服务记录查询";
    [self push:serviceSearch];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - Table view data source


@end
